package a.f.d.a;

import a.a.jb;
import a.c.bb;
import a.c.e;
import a.c.k;
import a.c.q;
import a.c.v;
import a.c.w;
import a.c.x;
import a.c.z;
import a.d.s;
import a.d.t;
import a.d.u;
import a.f.c.i;
import a.f.o;
import a.f.wc;
import a.i.db;

import java.awt.geom.Rectangle2D;
import java.util.*;

class zc
{
  zc a;
  e b;
  private z c;
  vb d;
  vb f;
  float g;
  float h;
  int j;
  int k;
  float l;
  float m;
  int n;
  int o;
  a[] p;
  private float q;
  int r;
  v s;
  BitSet t;
  int u;
  int v;
  boolean w;
  Rectangle2D x;
  double y;
  double z;
  public t A;
  public vb B;
  public vb C;
  hb D;
  HashSet E;
  private static final int F = 2;
  private static final int G = 1;
  double H;
  double I;
  HashMap J = new HashMap();
  
  zc(hb paramhb, e parame)
  {
    this.D = paramhb;
    if (!d.R)
    {
      if (parame != null)
      {
        this.b = parame;
        o localo = (o)parame.g();
        a.f.zc localzc = localo.d(parame);
        this.A = new t(localzc.a(), localzc.b(), localzc.c(), localzc.d());
      }
      this.c = new z();
      this.E = new HashSet();
    }
  }
  
  void a(Object paramObject)
  {
    if (!d.R)
    {
      if (!this.E.contains(paramObject)) {
        this.c.b(paramObject);
      }
    }
    else {
      this.E.add(paramObject);
    }
  }
  
  public void a(ac paramac, int paramInt, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (((bool2) || (this.d != null)) && ((bool2) || (this.f != null)) && ((bool2) || ((this.d.e() <= paramInt) && ((bool2) || (this.f.e() >= paramInt)))))
    {
      int i = 0;
      a locala = b(paramInt);
      bb localbb1 = null;
      bb localbb2 = null;
      int i1 = parambc.a((e)locala.a()).i();
      int i2 = parambc.a((e)locala.d()).i();
      Object localObject1 = locala.f();
      label428:
      label443:
      label451:
      label464:
      label471:
      label473:
      do
      {
        if (localObject1 == null) {
          break;
        }
        if (bool1) {
          break label483;
        }
        if ((((v)localObject1).c() instanceof e))
        {
          localObject2 = (e)((v)localObject1).c();
          ec localec1 = parambc.a((e)localObject2);
          if ((!bool2) && (localec1.d() != 15)) {
            break label464;
          }
          if (!bool2)
          {
            if (i == 0)
            {
              this.J.clear();
              localbb1 = new bb();
              localbb2 = new bb();
            }
            i = 1;
          }
          if (localec1.c() <= 0) {
            break label464;
          }
          double d1 = 0.0D;
          v localv = localec1.b();
          do
          {
            if (localv == null) {
              break;
            }
            a.c.d locald = (a.c.d)localv.c();
            ec localec2 = parambc.a(locald.a((e)localObject2));
            d1 += localec2.i();
            localv = localv.a();
            if (bool2) {
              break label473;
            }
            if (bool1) {
              break label471;
            }
          } while (!bool1);
          double d2 = d1 / localec1.c();
          if (bool2) {
            continue;
          }
          if (!bool2) {
            if (Math.abs(d2 - i1) < Math.abs(i2 - d2))
            {
              localbb1.add(localObject2);
              this.J.put(localObject2, new Double(d2));
              if (bool2) {
                break label443;
              }
              if (!bool1) {
                break label428;
              }
            }
          }
          localbb2.add(localObject2);
          this.J.put(localObject2, new Double(-d2));
          if (bool2) {
            break label451;
          }
          locala.h((v)localObject1);
          if (!bool1) {
            break label464;
          }
        }
        Object localObject2 = (zc)((v)localObject1).c();
        ((zc)localObject2).a(paramac, paramInt, parambc);
        localObject1 = ((v)localObject1).a();
      } while (!bool1);
      if ((!bool2) && (i != 0))
      {
        label483:
        localObject1 = a.i.l.f(db.a(this.J));
        localbb1.a((Comparator)localObject1);
        localbb2.a((Comparator)localObject1);
        do
        {
          if (!localbb1.isEmpty()) {}
          while (bool2)
          {
            locala.b(localbb1.b(), locala.f());
            if ((!bool2) && (bool1)) {
              return;
            }
            if (!bool1) {
              break;
            }
          }
          if (localbb2.isEmpty()) {
            break;
          }
          locala.a(localbb2.b(), locala.g());
        } while (!bool1);
      }
    }
  }
  
  void a(vb paramvb, o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i = paramvb.e();
    a locala1 = b(i);
    locala1.h = 0.0D;
    v localv = locala1.f();
    if (localv != null) {
      if (!bool2) {
        if ((localv.c() instanceof e))
        {
          localObject = paramo.d(localv.c());
          locala1.h = Math.max(locala1.h, ((a.f.zc)localObject).d());
          if (bool2) {
            break label211;
          }
          if (!bool1) {
            break label202;
          }
        }
      }
    }
    label202:
    label211:
    while (bool2)
    {
      Object localObject = (zc)localv.c();
      ((zc)localObject).a(paramvb, paramo);
      a locala2 = ((zc)localObject).b(i);
      a.f.zc localzc = paramo.d(locala2.a());
      localzc.b(localzc.c(), locala2.h);
      localzc = paramo.d(locala2.d());
      localzc.b(localzc.c(), locala2.h);
      locala1.h = Math.max(locala1.h, locala2.h);
      localv = localv.a();
      if (!bool1) {
        break;
      }
    }
  }
  
  void a(int paramInt)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (!bool2) {
      if (this.d.e() <= paramInt)
      {
        if (bool2) {
          break label119;
        }
        if (this.f.e() >= paramInt)
        {
          a locala = b(paramInt);
          int i = 0;
          v localv = locala.f();
          do
          {
            if (localv == null) {
              break;
            }
            if (!bool2)
            {
              if ((localv.c() instanceof zc))
              {
                zc localzc = (zc)localv.c();
                localzc.r = (i++);
                localzc.a(paramInt);
              }
              localv = localv.a();
            }
          } while (!bool1);
        }
      }
    }
    label119:
    this.r = -1;
  }
  
  void a()
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    q localq = new q();
    x localx = localq.B();
    if (((bool2) || (this.d != null)) && ((bool2) || (this.f != null)))
    {
      int i = this.d.e();
      int i1 = this.f.e();
      HashMap localHashMap = new HashMap();
      int i2 = i;
      label283:
      label301:
      do
      {
        do
        {
          if (i2 > i1) {
            break;
          }
          a locala = b(i2);
          Object localObject1 = null;
          Object localObject2 = null;
          if (bool1) {
            return;
          }
          v localv = locala.f();
          do
          {
            if (localv == null) {
              break label301;
            }
            Object localObject3 = localv.c();
            if (bool1) {
              break;
            }
            if ((localObject3 instanceof zc))
            {
              zc localzc = (zc)localObject3;
              e locale = (e)localHashMap.get(localzc);
              if (!bool2) {
                if (locale == null)
                {
                  locale = localq.i();
                  localHashMap.put(localzc, locale);
                  localx.a(locale, localzc);
                }
              }
              if (!bool2) {
                if (localObject1 != null)
                {
                  if (bool2) {
                    break label283;
                  }
                  if (((e)localObject1).a(locale) == null)
                  {
                    if (!bool2) {
                      if (locale.a((e)localObject1) != null) {
                        throw new IllegalStateException("grouping inconsistent " + localObject2 + " <-- " + localzc);
                      }
                    }
                    a.c.d locald = localq.a((e)localObject1, locale);
                  }
                }
              }
              localObject1 = locale;
              localObject2 = localzc;
            }
            localv = localv.a();
          } while (!bool1);
          i2++;
        } while (bool2);
      } while (!bool1);
      if ((!bool2) && (a.a.l.b(localq))) {
        throw new IllegalStateException("grouping inconsistent");
      }
    }
  }
  
  v a(int paramInt, v paramv)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    v localv = b(paramInt).f();
    label95:
    do
    {
      if (localv == null) {
        break;
      }
      if ((!bool2) && (bool1)) {
        break label106;
      }
      Object localObject1 = localv.c();
      if (!bool2) {
        if ((localObject1 instanceof zc))
        {
          localObject2 = (zc)localObject1;
          paramv = ((zc)localObject2).a(paramInt, paramv);
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label95;
          }
        }
      }
      Object localObject2 = (e)localObject1;
      paramv.a(localObject1);
      paramv = paramv.a();
      localv = localv.a();
    } while (!bool1);
    label106:
    return paramv;
  }
  
  void b()
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if ((bool2) || ((this.d == null) || (this.f == null))) {
      return;
    }
    q localq = new q();
    x localx = localq.B();
    int i = this.d.e();
    int i1 = this.f.e();
    int i2 = 0;
    HashMap localHashMap = new HashMap();
    int i3 = i;
    Object localObject1;
    Object localObject2;
    Object localObject3;
    Object localObject4;
    zc localzc;
    label236:
    label250:
    do
    {
      do
      {
        if (i3 > i1) {
          break;
        }
        localObject1 = b(i3);
        localObject2 = null;
        if (bool1) {
          break label272;
        }
        localObject3 = ((z)localObject1).f();
        do
        {
          if (localObject3 == null) {
            break label250;
          }
          localObject4 = ((v)localObject3).c();
          if (bool1) {
            break;
          }
          if ((localObject4 instanceof zc))
          {
            localzc = (zc)localObject4;
            e locale = (e)localHashMap.get(localzc);
            if (!bool2) {
              if (locale == null)
              {
                locale = localq.i();
                localHashMap.put(localzc, locale);
                localx.a(locale, localzc);
                localzc.u = (i2++);
              }
            }
            if (!bool2) {
              if (localObject2 != null)
              {
                if (bool2) {
                  break label236;
                }
                if (((e)localObject2).a(locale) == null) {
                  a.c.d locald = localq.a((e)localObject2, locale);
                }
              }
            }
            localObject2 = locale;
          }
          localObject3 = ((v)localObject3).a();
        } while (!bool1);
        i3++;
      } while (bool2);
    } while (!bool1);
    if (!bool2) {
      jb.b(localq);
    }
    label272:
    w localw = localq.v();
    label410:
    label412:
    do
    {
      do
      {
        if (!localw.e()) {
          return;
        }
        localObject1 = localw.d();
        localObject2 = (zc)localx.get(localObject1);
        ((zc)localObject2).t = new BitSet(localq.j());
        localObject3 = ((e)localObject1).h();
        do
        {
          if (localObject3 == null) {
            break;
          }
          localObject4 = ((a.c.d)localObject3).f();
          localzc = (zc)localx.get(localObject4);
          ((zc)localObject2).t.set(localzc.u);
          localObject3 = ((a.c.d)localObject3).i();
          if (bool2) {
            break label412;
          }
          if (bool1) {
            break label410;
          }
        } while (!bool1);
        ((zc)localObject2).b();
      } while (bool2);
      localw.f();
    } while (!bool1);
  }
  
  void a(int paramInt, boolean paramBoolean, k paramk)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a locala = b(paramInt);
    Object localObject1 = locala.f();
    Object localObject3;
    do
    {
      do
      {
        if (localObject1 == null) {
          break;
        }
        localObject2 = ((v)localObject1).c();
        if (bool1) {
          break label811;
        }
        if ((localObject2 instanceof zc))
        {
          localObject3 = (zc)localObject2;
          if (!bool2) {}
          ((zc)localObject3).w = (((zc)localObject3).k > 0);
        }
        localObject1 = ((v)localObject1).a();
      } while (!bool1);
    } while (bool2);
    localObject1 = locala.f();
    label191:
    label192:
    label508:
    do
    {
      do
      {
        int i1;
        Object localObject4;
        int i2;
        int i3;
        do
        {
          if (localObject1 == null) {
            break label810;
          }
          localObject2 = ((v)localObject1).c();
          if (bool1) {
            break label811;
          }
          if (!(localObject2 instanceof zc)) {
            break label798;
          }
          localObject3 = (zc)localObject2;
          if (!bool2) {
            if (paramBoolean)
            {
              if (bool2) {
                break label192;
              }
              if (((zc)localObject3).d.e() < paramInt) {
                break label191;
              }
            }
          }
          if ((bool2) || (!paramBoolean)) {
            if (bool2) {}
          }
          i1 = ((zc)localObject3).f.e() > paramInt ? 1 : 0;
          if (bool2) {
            break label807;
          }
          if (((zc)localObject3).w) {
            break label798;
          }
          localObject4 = null;
          localv = ((v)localObject1).b();
          do
          {
            do
            {
              do
              {
                do
                {
                  if (localv == null) {
                    break label444;
                  }
                  if (bool1) {
                    break label811;
                  }
                  if (!(localv.c() instanceof zc)) {
                    break label432;
                  }
                  localObject5 = (zc)localv.c();
                  if (!bool2) {
                    if (paramBoolean)
                    {
                      if (bool2) {
                        break label309;
                      }
                      if (((zc)localObject5).d.e() < paramInt) {
                        break label308;
                      }
                    }
                  }
                  if ((bool2) || (!paramBoolean)) {
                    if (bool2) {}
                  }
                  i2 = ((zc)localObject5).f.e() > paramInt ? 1 : 0;
                  if ((bool2) || (i1 != 0)) {
                    if (bool2) {}
                  }
                  i3 = (bool2) || (((zc)localObject5).w) ? ((zc)localObject3).a((zc)localObject5, i2 != 0) : 0;
                  if (bool2) {
                    break label395;
                  }
                  if (i3 != 0) {
                    break;
                  }
                  localv = localv.b();
                } while ((!bool2) && (!bool1));
                if (!bool2) {
                  if (i3 < 0)
                  {
                    localObject4 = localv;
                    localv = localv.b();
                  }
                }
              } while ((!bool2) && ((!bool1) || (i3 <= 0)));
              break;
              localv = localv.b();
            } while (!bool1);
          } while (bool2);
          if (bool2) {
            break label508;
          }
          if (localObject4 == null) {
            break;
          }
          localObject5 = ((v)localObject1).a();
          locala.h((v)localObject1);
          locala.a((v)localObject1, localObject4);
          if (bool2) {
            break label508;
          }
          localObject1 = localObject5;
          ((zc)localObject3).w = true;
        } while (!bool1);
        v localv = ((v)localObject1).a();
        do
        {
          do
          {
            do
            {
              do
              {
                if (localv == null) {
                  break label733;
                }
                if (bool1) {
                  break label811;
                }
                if (!(localv.c() instanceof zc)) {
                  break label721;
                }
                localObject5 = (zc)localv.c();
                if (!bool2) {
                  if (paramBoolean)
                  {
                    if (bool2) {
                      break label598;
                    }
                    if (((zc)localObject5).d.e() < paramInt) {
                      break label597;
                    }
                  }
                }
                if ((bool2) || (!paramBoolean)) {
                  if (bool2) {}
                }
                i2 = ((zc)localObject5).f.e() > paramInt ? 1 : 0;
                if ((bool2) || (i1 != 0)) {
                  if (bool2) {}
                }
                i3 = (bool2) || (((zc)localObject5).w) ? ((zc)localObject3).a((zc)localObject5, i2 != 0) : 0;
                if (bool2) {
                  break label684;
                }
                if (i3 != 0) {
                  break;
                }
                localv = localv.a();
              } while ((!bool2) && (!bool1));
              if (!bool2) {
                if (i3 > 0)
                {
                  localObject4 = localv;
                  localv = localv.a();
                }
              }
            } while ((!bool2) && ((!bool1) || (i3 >= 0)));
            break;
            localv = localv.a();
          } while (!bool1);
        } while (bool2);
        if ((!bool2) && (localObject4 == null)) {
          break;
        }
        Object localObject5 = ((v)localObject1).a();
        locala.h((v)localObject1);
        locala.b((v)localObject1, localObject4);
        localObject1 = localObject5;
        if (bool2) {
          break label795;
        }
        ((zc)localObject3).w = true;
      } while (!bool1);
      ((zc)localObject3).w = true;
      localObject1 = ((v)localObject1).a();
    } while (!bool1);
    label308:
    label309:
    label444:
    label597:
    label598:
    label733:
    int i = 0;
    label395:
    label432:
    label721:
    Object localObject2 = locala.f();
    label684:
    do
    {
      if (localObject2 == null) {
        break;
      }
      localObject3 = ((v)localObject2).c();
      if (!bool2)
      {
        if ((localObject3 instanceof zc))
        {
          zc localzc = (zc)localObject3;
          localzc.r = (i++);
          localzc.a(paramInt, paramBoolean, paramk);
        }
        localObject2 = ((v)localObject2).a();
      }
    } while (!bool1);
    label795:
    label798:
    label807:
    label810:
    label811:
    return;
  }
  
  int a(zc paramzc, boolean paramBoolean)
  {
    boolean bool = d.R;
    if (!bool)
    {
      if (paramBoolean) {
        if (bool) {
          break label45;
        }
      }
    }
    else if (this.r >= 0)
    {
      if (bool) {
        break label45;
      }
      if (paramzc.r >= 0) {
        return this.r - paramzc.r;
      }
    }
    label45:
    if (((bool) || (this.t != null)) && ((bool) || (paramzc.t != null)))
    {
      if (!bool) {
        if (this.t.get(paramzc.u)) {
          return -1;
        }
      }
      if (bool) {
        break label107;
      }
      if (paramzc.t.get(this.u)) {
        return 1;
      }
    }
    label107:
    return 0;
  }
  
  void d()
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    Iterator localIterator = this.c.iterator();
    label108:
    label112:
    do
    {
      do
      {
        zc localzc;
        do
        {
          do
          {
            Object localObject;
            do
            {
              if (!localIterator.hasNext()) {
                break;
              }
              localObject = localIterator.next();
            } while (!(localObject instanceof zc));
            localzc = (zc)localObject;
            localzc.d();
            if (!bool2) {
              if (localzc.d != null)
              {
                if (!bool2) {
                  if (this.d != null)
                  {
                    if (bool2) {
                      break label112;
                    }
                    if (localzc.d.e() >= this.d.e()) {
                      break label108;
                    }
                  }
                }
                this.d = localzc.d;
              }
            }
            if (!bool2) {
              if (localzc.B != null)
              {
                if (!bool2) {
                  if (this.B != null)
                  {
                    if (bool2) {
                      break label170;
                    }
                    if (localzc.B.e() >= this.B.e()) {
                      break label166;
                    }
                  }
                }
                this.B = localzc.B;
              }
            }
            if (!bool2) {
              if (localzc.f != null)
              {
                if (!bool2) {
                  if (this.f != null)
                  {
                    if (bool2) {
                      break label228;
                    }
                    if (localzc.f.e() <= this.f.e()) {
                      break label224;
                    }
                  }
                }
                this.f = localzc.f;
              }
            }
            if (bool2) {
              break;
            }
          } while (localzc.C == null);
          if (bool2) {
            break label275;
          }
          if (this.C == null) {
            break;
          }
          if (bool2) {
            break label284;
          }
        } while (localzc.C.e() <= this.C.e());
        this.C = localzc.C;
      } while (bool2);
    } while (!bool1);
    label166:
    label170:
    label224:
    label228:
    return;
  }
  
  void a(o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    bb localbb = new bb();
    Object localObject1 = this.c.iterator();
    if (((Iterator)localObject1).hasNext()) {}
    label85:
    while (bool2)
    {
      Object localObject2 = ((Iterator)localObject1).next();
      if (!bool2)
      {
        if (bool1) {
          return;
        }
        if (bool2) {}
      }
      else if ((localObject2 instanceof e))
      {
        if (bool2) {
          break label85;
        }
        localbb.add(localObject2);
        if (!bool1) {
          break;
        }
      }
      zc localzc = (zc)localObject2;
      localzc.a(paramo);
      localbb.add(localzc.b);
      if (!bool1) {
        break;
      }
    }
    if (this.b != null)
    {
      localObject1 = wc.a(paramo, localbb.l());
      paramo.b(this.b, ((Rectangle2D)localObject1).getWidth(), ((Rectangle2D)localObject1).getHeight());
      paramo.c(this.b, ((Rectangle2D)localObject1).getX(), ((Rectangle2D)localObject1).getY());
    }
  }
  
  private void e()
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i = this.d.e();
    int i1 = this.f.e();
    this.p = new a[i1 - i + 1];
    do
    {
      for (int i2 = i; !bool1; i2++)
      {
        if (i2 > i1) {
          break;
        }
        this.p[(i2 - i)] = new a();
      }
    } while (bool2);
  }
  
  void f()
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i = this.d.e();
    int i1 = this.f.e();
    this.p = new a[i1 - i + 1];
    do
    {
      for (int i2 = i; !bool1; i2++)
      {
        if (i2 > i1) {
          break;
        }
        this.p[(i2 - i)] = new a();
      }
    } while (bool2);
  }
  
  void a(ac paramac, bc parambc, ad paramad)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if ((bool2) || (this.d != null))
    {
      if (bool2) {
        break label39;
      }
      if (this.f != null) {}
    }
    else
    {
      return;
    }
    label39:
    int i = this.d.e();
    int i1 = this.f.e();
    this.p = new a[i1 - i + 1];
    int i2 = i;
    do
    {
      while (!bool1)
      {
        if (i2 > i1) {
          break;
        }
        if (bool1) {
          break label118;
        }
        this.p[(i2 - i)] = new a();
        i2++;
      }
    } while (bool2);
    label118:
    Iterator localIterator = this.c.iterator();
    label260:
    do
    {
      Object localObject2;
      int i4;
      int i5;
      while (i5 > i4)
      {
        do
        {
          do
          {
            Object localObject1;
            do
            {
              do
              {
                do
                {
                  do
                  {
                    if (!localIterator.hasNext()) {
                      return;
                    }
                    localObject1 = localIterator.next();
                    if (bool2) {
                      break label260;
                    }
                    if (!(localObject1 instanceof e)) {
                      break;
                    }
                    localObject2 = (e)localObject1;
                  } while ((((e)localObject2).g() == null) || (paramad.b(localObject2) != this));
                  i3 = parambc.a((e)localObject2).h();
                  if (bool2) {
                    break;
                  }
                } while (this.d.e() > i3);
                if (bool2) {
                  break;
                }
              } while (this.f.e() < i3);
              if (bool2) {
                break label260;
              }
              b(i3).add(localObject2);
            } while (!bool1);
            localObject2 = (zc)localObject1;
          } while (((zc)localObject2).d == null);
          if (bool2) {
            break;
          }
        } while (((zc)localObject2).f == null);
        ((zc)localObject2).a(paramac, parambc, paramad);
        int i3 = ((zc)localObject2).d.e();
        i4 = ((zc)localObject2).f.e();
        i5 = i3;
      }
      b(i5).add(localObject2);
      i5++;
    } while ((!bool2) && ((!bool1) && (!bool1)));
  }
  
  void a(int paramInt, float[] paramArrayOfFloat, k paramk, bc parambc, boolean paramBoolean)
  {
    a(paramInt, paramArrayOfFloat, paramk, paramBoolean);
    Comparator local0 = new Comparator()
    {
      private final float[] val$nodeWeight;
      
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        boolean bool = d.R;
        float f1 = (bool) || ((paramAnonymousObject1 instanceof zc)) ? ((zc)paramAnonymousObject1).q : this.val$nodeWeight[((e)paramAnonymousObject1).f()];
        float f2 = (bool) || ((paramAnonymousObject2 instanceof zc)) ? ((zc)paramAnonymousObject2).q : this.val$nodeWeight[((e)paramAnonymousObject2).f()];
        if (!bool) {}
        if (!bool) {}
        return f1 > f2 ? 1 : f1 < f2 ? -1 : 0;
      }
    };
    a(paramInt, local0, parambc);
  }
  
  private void a(int paramInt, Comparator paramComparator, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a locala = b(paramInt);
    locala.a(paramComparator);
    Object localObject1 = null;
    Object localObject2 = null;
    v localv = locala.f();
    label153:
    do
    {
      do
      {
        if (localv == null) {
          break;
        }
        if (bool1) {
          break label242;
        }
        if (!bool2)
        {
          if ((localv.c() instanceof zc)) {
            ((zc)localv.c()).a(paramInt, paramComparator, parambc);
          }
        }
        else
        {
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label153;
          }
        }
        e locale = (e)localv.c();
        int i = parambc.a(locale).d();
        if (!bool2)
        {
          if (i == 12)
          {
            localObject1 = localv;
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
          else
          {
            if (bool2) {
              continue;
            }
          }
        }
        else if (i == 13) {
          localObject2 = localv;
        }
        localv = localv.a();
      } while (!bool1);
    } while (bool2);
    if (!bool2) {
      if (localObject1 != null)
      {
        if (bool2) {
          break label217;
        }
        if (localObject1 != locala.f())
        {
          locala.h(localObject1);
          locala.a(localObject1, locala.f());
        }
      }
    }
    label217:
    if (((bool2) || (localObject2 != null)) && (localObject2 != locala.g()))
    {
      label242:
      locala.h(localObject2);
      locala.b(localObject2, locala.g());
    }
  }
  
  a b(int paramInt)
  {
    return this.p[(paramInt - this.d.e())];
  }
  
  private void a(int paramInt, float[] paramArrayOfFloat, k paramk, boolean paramBoolean)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    this.g = (this.h = this.l = this.m = 0.0F);
    this.j = (this.k = this.n = this.o = 0);
    Iterator localIterator = b(paramInt).iterator();
    if (localIterator.hasNext()) {}
    label233:
    while (bool2)
    {
      Object localObject1 = localIterator.next();
      if (bool1) {
        break label464;
      }
      if ((localObject1 instanceof zc))
      {
        localObject2 = (zc)localObject1;
        ((zc)localObject2).a(paramInt, paramArrayOfFloat, paramk, paramBoolean);
        this.g += ((zc)localObject2).g;
        this.j += ((zc)localObject2).j;
        this.h += ((zc)localObject2).h;
        this.k += ((zc)localObject2).k;
        this.l += ((zc)localObject2).l;
        this.n += ((zc)localObject2).n;
        this.m += ((zc)localObject2).m;
        if (bool2) {
          break label233;
        }
        this.o += ((zc)localObject2).o;
        if (!bool1) {
          break;
        }
      }
      Object localObject2 = (e)localObject1;
      if (!bool2) {
        if (paramBoolean)
        {
          if (bool2) {
            break label285;
          }
          if (((e)localObject2).d() > 0) {
            break label284;
          }
        }
      }
      if ((bool2) || (!paramBoolean)) {
        if (bool2) {}
      }
      int i = ((e)localObject2).e() > 0 ? 1 : 0;
      if ((bool2) || (paramk != null))
      {
        if (bool2) {
          break label390;
        }
        if (!paramk.getBool(localObject2))
        {
          if (!bool2)
          {
            if (i != 0)
            {
              this.k += 1;
              this.h += paramArrayOfFloat[localObject2.f()];
            }
            this.o += 1;
            this.m += paramArrayOfFloat[localObject2.f()];
          }
          if ((!bool2) && (!bool1)) {
            break;
          }
        }
      }
      if (!bool2)
      {
        if (i != 0)
        {
          this.j += 1;
          this.g += paramArrayOfFloat[localObject2.f()];
        }
        this.n += 1;
        this.l += paramArrayOfFloat[localObject2.f()];
      }
      if (!bool1) {
        break;
      }
    }
    label284:
    label285:
    if (this.k > 0)
    {
      label464:
      this.q = (this.h / this.k);
      if ((!bool2) && (!bool1)) {}
    }
    else
    {
      if (!bool2) {
        if (this.j > 0)
        {
          this.q = (this.g / this.j);
          if ((!bool2) && (!bool1)) {
            return;
          }
        }
      }
      if (!bool2) {
        if (this.o > 0)
        {
          this.q = (this.m / this.o);
          if (!bool2) {
            if (!bool1) {
              return;
            }
          }
        }
        else
        {
          if (bool2) {
            break label600;
          }
        }
      }
      if (this.n > 0)
      {
        if (bool2) {
          break label601;
        }
        this.q = (this.l / this.n);
        if (!bool1) {
          return;
        }
      }
      label600:
      label601:
      this.q = 0.0F;
    }
    label390:
  }
  
  v a(vb paramvb, v paramv, rb paramrb, ad paramad)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (((bool2) || (this.d != null)) && ((bool2) || (this.d.e() <= paramvb.e())) && ((bool2) || (this.f != null)))
    {
      if (bool2) {
        break label83;
      }
      if (this.f.e() >= paramvb.e()) {}
    }
    else
    {
      return paramv;
    }
    label83:
    bb localbb = paramvb.c();
    a locala = b(paramvb.e());
    int i = 1;
    Object localObject2;
    if (!bool2) {
      if (locala.size() > 1)
      {
        if (bool2) {
          break label230;
        }
        if ((locala.a() instanceof e))
        {
          if (bool2) {
            break label230;
          }
          if ((locala.d() instanceof e))
          {
            localObject1 = paramad.i.a((e)locala.a());
            localObject2 = paramad.i.a((e)locala.d());
            if ((bool2) || ((((ec)localObject1).d() == 12) && ((bool2) || (((ec)localObject2).d() == 13)))) {
              i = 0;
            }
          }
        }
      }
    }
    label230:
    Object localObject1 = locala.f();
    label375:
    do
    {
      if (localObject1 == null) {
        break;
      }
      if ((!bool2) && (bool1)) {
        break label476;
      }
      localObject2 = ((v)localObject1).c();
      if ((bool2) || ((localObject2 instanceof zc)))
      {
        zc localzc = (zc)localObject2;
        if (!bool2)
        {
          if (i != 0)
          {
            e locale1 = paramrb.a(localzc.b, paramvb, (byte)12);
            localbb.a(locale1, paramv);
            paramv = localzc.a(paramvb, paramv, paramrb, paramad);
            e locale2 = paramrb.a(localzc.b, paramvb, (byte)13);
            if (!bool2) {
              if (paramv != null)
              {
                localbb.a(locale2, paramv);
                if (bool2) {
                  break label429;
                }
                if (!bool1) {
                  break label375;
                }
              }
            }
            localbb.b(locale2);
            localzc.b(paramvb.e()).a(locale1);
            localzc.b(paramvb.e()).b(locale2);
            paramad.a(locale1, localzc);
            paramad.a(locale2, localzc);
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
          else
          {
            paramv = localzc.a(paramvb, paramv, paramrb, paramad);
          }
        }
        else
        {
          if (bool2) {
            continue;
          }
          if (!bool1) {}
        }
      }
      else
      {
        paramv = paramv.a();
      }
      localObject1 = ((v)localObject1).a();
    } while (!bool1);
    label429:
    label476:
    return paramv;
  }
  
  public void a(bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    Iterator localIterator = this.c.iterator();
    if (localIterator.hasNext()) {}
    Object localObject1;
    Object localObject2;
    Object localObject3;
    label118:
    label122:
    while (bool2)
    {
      localObject1 = localIterator.next();
      if (bool1) {
        break label151;
      }
      if ((localObject1 instanceof e))
      {
        localObject2 = (e)localObject1;
        localObject3 = parambc.a((e)localObject2);
        if (!bool2)
        {
          if (((ec)localObject3).d() != 12)
          {
            if (bool2) {
              break label118;
            }
            if (((ec)localObject3).d() != 13) {
              break;
            }
          }
          localIterator.remove();
          if (bool2) {
            break label122;
          }
          this.E.remove(localObject1);
        }
        if (!bool1) {
          break;
        }
      }
      localObject2 = (zc)localObject1;
      ((zc)localObject2).a(parambc);
      if (!bool1) {
        break;
      }
    }
    label256:
    label268:
    if (this.p != null)
    {
      label151:
      int i = 0;
      label187:
      do
      {
        do
        {
          break label187;
          if (i >= this.p.length) {
            break;
          }
          localObject1 = this.p[i];
          localObject2 = ((z)localObject1).f();
          do
          {
            if (localObject2 == null) {
              break label268;
            }
            if (bool1) {
              break;
            }
            if ((((v)localObject2).c() instanceof e))
            {
              localObject3 = (e)((v)localObject2).c();
              ec localec = parambc.a((e)localObject3);
              if (!bool2) {
                if (localec.d() != 12)
                {
                  if (bool2) {
                    continue;
                  }
                  if (localec.d() != 13) {
                    break label256;
                  }
                }
              }
              ((z)localObject1).h((v)localObject2);
            }
            localObject2 = ((v)localObject2).a();
          } while (!bool1);
          i++;
        } while (bool2);
      } while (!bool1);
    }
  }
  
  public void a(kb paramkb, vb paramvb, boolean paramBoolean, double paramDouble)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    bc localbc = this.D.d;
    o localo = this.D.c;
    a locala = b(paramvb.e());
    Object localObject1 = null;
    v localv1 = locala.f();
    label159:
    label808:
    do
    {
      do
      {
        if (localv1 == null) {
          return;
        }
        Object localObject2 = localv1.c();
        if (!bool2) {
          if ((localObject2 instanceof zc))
          {
            localObject3 = (zc)localObject2;
            ((zc)localObject3).a(paramkb, paramvb, paramBoolean, paramDouble);
            if (!bool2) {
              if ((paramBoolean) && (this.B == paramvb)) {
                paramkb.a(this, localObject3, 2);
              }
            }
            if ((!bool2) && ((!bool1) || (paramBoolean))) {
              continue;
            }
            if (this.C != paramvb) {
              continue;
            }
            if (bool2) {
              break label159;
            }
            paramkb.a(localObject3, this, 2);
            if (!bool1) {
              continue;
            }
          }
        }
        Object localObject3 = (e)localObject2;
        ec localec = localbc.a((e)localObject3);
        double d3;
        e locale;
        u localu;
        fc localfc;
        double d4;
        double d5;
        double d6;
        kb.g_ localg_;
        a.c.d locald;
        if (!bool2)
        {
          if ((paramBoolean) && (this.B == paramvb))
          {
            if (!bool2) {
              if (localec.d() == 12)
              {
                localObject1 = localObject3;
                if ((!bool2) && (!bool1)) {
                  continue;
                }
              }
            }
            if (!bool2) {
              if (localec.d() == 13)
              {
                double d1 = localo.p(localObject1) + localo.s(localObject1);
                d3 = localo.p((e)localObject3);
                locale = localec.f();
                localu = this.D.f(locale);
                localfc = localbc.a(locale).m();
                d4 = Math.max((bool2) || (localfc != null) ? localfc.d() : 0.0D, this.D.j());
                d5 = localu.b;
                d6 = d4;
                if (!bool2) {}
                if (!bool2) {}
                localg_ = paramkb.a(this, 0.0D, d6, d5, d1, !paramBoolean, d3, !paramBoolean);
                localg_.q = (Math.min(localo.n(localObject1), localo.n((e)localObject3)) + paramDouble);
              }
            }
            if (((!bool2) && ((bool1) && (bool2))) || (localec.d() == 15))
            {
              v localv2 = localec.b();
              do
              {
                if (localv2 == null) {
                  break;
                }
                locald = (a.c.d)localv2.c();
                paramkb.a(locald, this, 1);
                localv2 = localv2.a();
                if (bool2) {
                  break label901;
                }
                if (bool1) {
                  break label899;
                }
              } while (!bool1);
            }
          }
          else
          {
            if (bool2) {
              break label901;
            }
          }
        }
        else if (!paramBoolean) {
          if (this.C == paramvb)
          {
            if (!bool2) {
              if (localec.d() == 12)
              {
                localObject1 = localObject3;
                if ((!bool2) && (!bool1)) {
                  continue;
                }
              }
            }
            if (!bool2) {
              if (localec.d() == 13)
              {
                double d2 = localo.p(localObject1) + localo.s(localObject1);
                d3 = localo.p((e)localObject3);
                locale = localec.f();
                localu = this.D.f(locale);
                localfc = localbc.a(locale).m();
                d4 = Math.max((bool2) || (localfc != null) ? localfc.d() : 0.0D, this.D.j());
                d5 = localu.d;
                d6 = d4;
                if (!bool2) {}
                if (!bool2) {}
                localg_ = paramkb.a(this, 0.0D, d5, d6, d2, !paramBoolean, d3, !paramBoolean);
                k localk = localo.c(i.e);
                if (!bool2)
                {
                  if (localk != null)
                  {
                    s locals = (s)localk.get(this.b);
                    if (!bool2)
                    {
                      if (locals != null)
                      {
                        localg_.p = (this.H + locals.b);
                        if (bool2) {
                          break label789;
                        }
                        if (!bool1) {
                          continue;
                        }
                      }
                      localg_.p = this.H;
                    }
                    if (bool2) {
                      break label808;
                    }
                    if (!bool1) {
                      continue;
                    }
                  }
                  localg_.p = this.H;
                }
              }
            }
            if (((!bool2) && ((bool1) && (bool2))) || (localec.d() == 15))
            {
              v localv3 = localec.b();
              do
              {
                if (localv3 == null) {
                  break;
                }
                locald = (a.c.d)localv3.c();
                paramkb.a(this, locald, 1);
                localv3 = localv3.a();
                if (bool2) {
                  break label901;
                }
                if (bool1) {
                  break label899;
                }
              } while (!bool1);
            }
          }
        }
      } while (bool2);
      localv1 = localv1.a();
    } while (!bool1);
    label789:
  }
  
  public Collection g()
  {
    return this.c;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.zc

 * JD-Core Version:    0.7.0.1

 */